<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class Likes extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		//
        if(!Schema::hasTable('likes')){
            Schema::create('likes',function(Blueprint $table){
                $table->increments('id');
                $table->integer('user_id');
                $table->integer('lesson_id')->nullable();
                $table->integer('video_id')->nullable();
                $table->integer('lyric_id')->nullable();
                $table->timestamps();
                $table->softDeletes();
            });
        }
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		//
	}

}
